This invention relates to the scheduling of timed events in an internal combustion engine based on a high resolution engine position signal, and more particularly to a method of scheduling such events when the high resolution position signal is lost or corrupted.
When an internal combustion engine is controlled by a microprocessor-based control unit, the engine position is determined with crankshaft and/or camshaft position sensors, and events that occur in synchronism with engine position or stroke cycle are carried out by software routines executed in response to interrupt requests. The interrupt requests, in turn, are typically defined in terms of a position signal characteristic, such as a specified pulse number or a logic level transition. A common approach with four stroke engines is to utilize a high resolution position signal developed in response to crankshaft rotation (i.e., a crank signal) for interrupt scheduling, and to use a low-resolution position signal developed in response to camshaft rotation (i.e., a cam signal) to synchronize the crank signal with the engine stroke cycle. This approach is fairly cost effective, and provides some redundancy in the event of a sensor failure. However, the quality of control is significantly impaired when the high resolution sensor fails, and most default control strategies are only designed for what is commonly described as limp-home capability. Accordingly, what is needed is an improved default control method that is initiated in response to the loss of a high resolution engine position signal, and that more nearly achieves the control performance of a fully functional control system.
The present invention is directed to an improved default control method for recovering from the loss of a high-resolution position signal for an internal combustion engine, wherein a high resolution pulse period is calculated based on a recognized pattern of a low resolution engine position signal, interrupts for signaling the execution of cycle-related control algorithms are scheduled in time based on the calculated pulse period, and pulse period errors due to changing engine speed are periodically corrected based on the timing of subsequent transitions in the low resolution position signal relative to the scheduled interrupts. If an interrupt is scheduled to occur prior to an expected transition of the low resolution position signal, and the expected transition actually occurs first, the scheduled interrupt is serviced immediately, and the high resolution pulse period is re-calculated. If an interrupt is scheduled to occur after an expected transition of the low resolution position signal, and the interrupt actually occurs first, high resolution pulse period is re-calculated and used to re-schedule the interrupt.